package com.aegis.gateway.filter;

import com.aegis.gateway.constants.FilterChainEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

/**
 * @Author wuweixin
 *
 * @Version 1.0
 * @Descritube 最底层的后置处理器
 */
@Slf4j
@Component
public class AfterWebFilter extends BaseWebFilter {


    @Override
    public Mono<Void> doFilter(ServerWebExchange exchange, WebFilterChain chain) {
        log.info("===> filter chain end <===");
        return chain.filter(exchange);
    }

    @Override
    public int getOrder() {
        return FilterChainEnum.AFTER_FILTER.getOrder();
    }
}
